package com.tssm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.tssm.common.services.BaseServiceImpl;
import com.tssm.dao.SarcInvestigationCargoDAO;
import com.tssm.dao.SarcInvestigationDAO;
import com.tssm.pojo.SarcInvestigation;
import com.tssm.pojo.SarcInvestigation;
import com.tssm.pojo.SarcInvestigationCargo;
import com.tssm.service.SarcInvestigationService;
@Service("sarcinvestigationService")
public class SarcInvestigationServiceImpl extends BaseServiceImpl<SarcInvestigation> implements SarcInvestigationService {
	@Resource
	private SarcInvestigationDAO sarcinvestigationDAO;
	@Resource
	private SarcInvestigationCargoDAO sarcinvestigationcargoDAO;
	
	public List<SarcInvestigation> getInvestigationList(final Long id, int startIndex, int pageSize) {
		return sarcinvestigationDAO.getInvestigationList(id, startIndex, pageSize);
	}
	
	public int getInvestigationListCount(final Long id) {
		return sarcinvestigationDAO.getInvestigationListCount(id);
	}
	
	public SarcInvestigation getInvestigationById(final Long id) {
		return sarcinvestigationDAO.getInvestigationById(id);
	}
	
	public void saveInvestigationCargo(SarcInvestigationCargo squocargo) {
		sarcinvestigationcargoDAO.saveOrUpdate(squocargo);
	}
	
	public List<SarcInvestigationCargo> getInvestigationCargoList(final Long id, final int startIndex, final int pageSize) {
		return sarcinvestigationcargoDAO.getInvestigationCargoList(id, startIndex, pageSize);
	}
	
	public int getInvestigationCargoListCount(final Long id) {
		return sarcinvestigationcargoDAO.getInvestigationCargoListCount(id);
	}
	
	public SarcInvestigationCargo getInvestigationCargoById(final Long id) {
		return sarcinvestigationcargoDAO.getInvestigationCargoById(id);
	}
	
	public void deleteSarcInvestigationCargo(final Long id) {
		sarcinvestigationcargoDAO.symbolDelete(SarcInvestigationCargo.class, id);
	}
	
	public SarcInvestigationDAO getSarcinvestigationDAO() {
		return sarcinvestigationDAO;
	}
	public void setSarcinvestigationDAO(SarcInvestigationDAO sarcinvestigationDAO) {
		this.sarcinvestigationDAO = sarcinvestigationDAO;
	}
	public SarcInvestigationCargoDAO getSarcinvestigationcargoDAO() {
		return sarcinvestigationcargoDAO;
	}
	public void setSarcinvestigationcargoDAO(
			SarcInvestigationCargoDAO sarcinvestigationcargoDAO) {
		this.sarcinvestigationcargoDAO = sarcinvestigationcargoDAO;
	}
	
}
